Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Jul 31, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/17240

🧭 풀이 시간

5분

👀 체감 난이도

✏️ 문제 설명

N명의 학생과 5개의 역할이 있다.
각 학생의 역할 별 실력은 a[i], b[i], c[i], d[i], e[i]로 주어진다.
N명 중 5명을 뽑아, 각 역할 별 실력 합의 최댓값을 구해보자.

🔍 풀이 방법

  • DP
  • 비트마스킹

비트 5개를 사용하는 dp를 구성한다.
dp[mask] = max(dp[mask ^ (1<<k)] + arr[i][k], dp[mask])

⏳ 회고

피곤

@oncsr oncsr self-assigned this Jul 31, 2025
@oncsr oncsr added the success 👍 해설을 보지 않고 풀었을 때 label Jul 31, 2025
@ShinHeeEul ShinHeeEul merged commit a73387b into main Jul 31, 2025
1 check passed
@JHLEE325
Copy link
Contributor

5분 뭡니까

@lkhyun
Copy link
Contributor

lkhyun commented Jul 31, 2025

G1이 5분만에 풀리는 거였구나 ㄷㄷ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants